package com.sen.gateway;


import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;


/**
 * @author esJiang
 */
@SpringBootApplication
@EnableDiscoveryClient
@Slf4j
public class GatewayApplication implements CommandLineRunner {

    public static void main(String[] args) {
        if(args.length!=0){
            System.setProperty("spring.profiles.active",args[0]);
        }
        SpringApplication.run(GatewayApplication.class,args) ;
    }

    @Override
    public void run(String... args) throws Exception {
        log.info("sen-gateway start successfully ");
    }
}
